* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

ul {
    list-style: none;
}

#zj-prompt-container {
    display: flex;
    flex-direction: column;
    color: #fff;
    gap: 10px;
    height: 0;
    border-width: 0;
    border-style: solid;
    border-color: #4b5563;
    overflow: hidden;
    border-radius: 10px;
}

#zj-prompt-unfold-or-fold {
    padding: 5px;
    display: flex;
    justify-content: center;
}

#zj-prompt-unfold-or-fold > span:first-child {
    flex: 1;
}

#zj-prompt-unfold-or-fold > .icon {
    transform: rotate(90deg);
    margin-left: auto;
}

/* 展开或收起提示词 */
#zj-prompt-unfold-or-fold::after {

}

#zj-prompt-category {
    display: flex;
    flex-wrap: wrap;
    column-gap: 10px;
    row-gap: 5px;
    border: 1px solid #4b5563;
    padding: 10px;
    border-radius: 10px;
}

.zj-prompt-tab-button {
    border-radius: 4px !important;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
}

.zj-prompt-tab-button-active {
    background: #046060 !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.zj-prompt-tab-button:hover {
    background: #046060 !important;
}

#zj-prompt-all {
    flex: 1;
    border: 1px solid #4b5563;
    overflow: hidden;
    border-radius: 10px;
}


/*===========================================公共的==========================================*/
.zj-prompt-group-name {
    display: grid;
    place-content: center;
    background-color: orange;
    border-radius: 8px;
}

.zj-prompt-group-sub-data {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.zj-prompt-group-sub-data > * {
    flex-basis: calc(33.33% - 8px);
}

.zj-prompt-group-sub-data > :last-child {
    flex-grow: 1;
    flex-basis: 0;
}

.zj-prompt-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.zj-prompt-group {
    border: 1px solid #4b5563;
    padding: 5px;
    border-radius: 10px;
}

/*===========================================第一层===========================================*/
.zj-prompt-tab-content {
    width: 100%;
    height: 100%;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.zj-prompt-tab-content > .zj-prompt-group-name {

}

.zj-prompt-tab-content > .zj-prompt-group-sub-data {
    border: 1px solid #4b5563;
    padding: 10px;
    overflow-y: auto;
    height: 100%;
    border-radius: 10px;
}

.zj-prompt-tab-content > .zj-prompt-group-sub-data > .zj-prompt-group {

}


.zj-prompt-tab-content > .zj-prompt-group-sub-data > .zj-prompt-tags {
    height: 100%;
    overflow-y: auto;
}

/*==========================================子层=====================================*/
.zj-prompt-tab-content > .zj-prompt-group-sub-data .zj-prompt-group {
    border: 1px solid #4b5563;
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-radius: 10px;
}

.zj-prompt-tab-content > .zj-prompt-group-sub-data .zj-prompt-group:last-child {

}

.zj-prompt-tab-content > .zj-prompt-group-sub-data .zj-prompt-group-sub-data {
    overflow-y: auto;
}

.zj-prompt-tab-content > .zj-prompt-group-sub-data .zj-prompt-group-sub-data > .zj-prompt-group + .zj-prompt-tags {
    border: 1px solid #4b5563;
    padding: 5px;
    border-radius: 10px;
}

/*=======================================控制面板=======================================*/
#zj-prompt-control-panel {
    border-width: 1px;
    border-style: solid;
    border-color: #4b5563;
    height: 73px;

    padding: 10px;
    border-radius: 10px;
    display: flex;
    gap: 10px;
    flex-direction: column;
    overflow: hidden;
}

.zj-prompt-control-panel-row {
    flex: 1;
    border: 1px solid #4b5563;
    display: flex;
    padding: 10px;
    gap: 10px;
    border-radius: 10px;
}

#zj-prompt-switch, #zj-prompt-clear-positive, #zj-prompt-clear-negative, #zj-prompt-clear-all {
    flex: 1;
}

/*=================================================已选择提示词====================================*/
.zj-prompt-selected {
    /*display: none;*/
}

#zj-prompt-selected-positive {
    border-width: 0;
    display: block;
    height: 0;
    overflow: hidden;
}

#zj-prompt-selected-negative {
    border-width: 0;
    display: block;
    height: 0;
    overflow: hidden;
}

.zj-prompt-selected > :first-child {
    position: relative;
    border: 1px solid #4b5563;
    border-bottom: none;
    width: fit-content;
    padding: 5px;
    border-radius: 5px 5px 0 0;
    background: var(--body-background-fill);
    opacity: 1;
    top: 1px;
    display: grid;
    place-content: center;
}

.zj-prompt-selected > :last-child {
    border: 1px solid #4b5563;
    min-height: 40px;
    display: flex;
    align-items: center;
    padding: 10px;
    gap: 10px;
    flex-wrap: wrap;
}

.zj-prompt-selected-tag {
    display: flex;
    align-items: center;
    width: fit-content;
    border: 1px solid rgba(192, 192, 192, 0.4);
    border-radius: 5px;
    font-size: 10px;
}

.zj-prompt-selected-tag > div {
    display: grid;
    place-items: center;
    margin: 5px;
}

.zj-prompt-selected-tag > button {
    display: none;
    place-content: center;
    border: 1px solid rgba(192, 192, 192, 0.4);
    margin: 5px;
    border-radius: 3px;
    height: 1.5em;
    aspect-ratio: 1/1;
    color: red !important;
}

.zj-prompt-selected-tag:hover > button {
    display: grid;
}

/*========================================预设尺寸===========================================*/
#zj-prompt-preset-size {
    border-width: 0;
    border-style: solid;
    border-color: #4b5563;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    overflow: hidden;
    height: 0;
    border-radius: 10px;
}

.zj-prompt-preset-size-button {
    height: fit-content;
}

/*======================================== 保存生成信息 ========================================*/
/*----------------------------------------------------------------*/
#zj--dialog {
    border: 1px solid var(--block-border-color, #374151);
    background-color: var(--background-fill-primary, #0b0f19);
    width: 500px;
    height: 500px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* 设置对话框的显示和关闭动画效果 */
    transition: opacity 0.5s ease-in-out;
    /*position: relative;*/
    padding: 20px;
    color: white;
}

dialog::backdrop {
    background-color: rgba(194, 189, 189, 0.5);
}


dialog ul {
    position: relative;
    list-style: none;
    display: flex;
    gap: 10px;
    flex-direction: column;
}

dialog ul > li {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#zj--dialog-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

#zj--dialog-container > ul {
    border: 1px solid var(--block-border-color, #374151);;
    padding: 20px;
    flex: 1;
    overflow-y: scroll;
}

#zj--dialog-container > ul ul::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border-left: 1px solid var(--block-border-color, #374151);;
    border-top: 1px solid var(--block-border-color, #374151);;
    transform: rotateZ(45deg) translateY(-11px);
    background-color: var(--background-fill-primary, #0b0f19);
}

.zj--menu-item-label {
    flex: 1;
    display: flex;
    gap: 10px;
    border: 1px solid var(--block-border-color, #374151);
    padding: 10px;
}

.zj--menu-item-title {
    flex: 1;
    display: flex;
    align-items: center;
    align-content: center;
    justify-content: space-between;
    padding-left: 10px;
    padding-right: 10px;
    background-color: var(--input-background-fill, #1f2937);
}

.zj--has-child::after {
    content: '▷';
}

.zj--menu-item-label + ul {
    padding-left: 20px;
}

#zj--dialog-op {
    border: 1px solid var(--block-border-color, #374151);
    display: flex;
    gap: 20px;
    padding: 20px;
}

#zj--dialog-op > button {
    flex: 1;
}

#zj--dialog-input-sub-name-label, #zj--dialog-input-tag-name-label {
    border: 1px solid var(--block-border-color, #374151);
    padding: 10px;
    margin-left: 20px;
}

#zj--dialog-input-sub-name-label > span, #zj--dialog-input-tag-name-label > span {

}

#zj--dialog-input-sub-name, #zj--dialog-input-tag-name {
    flex: 1;
    background-color: var(--input-background-fill, #1f2937);
    outline: none;
    border: 1px solid var(--block-border-color, #374151);
    color: white;
}